<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">
    <script src="/layui/layui.js" charset="utf-8"></script>
</head>

<body>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
        <legend>订单详情</legend>
    </fieldset>

    <div id="test1" class="demo-tree demo-tree-box"></div>
    <script>
        layui.use(['tree'], function () {
            var tree = layui.tree
                , layer = layui.layer
                , util = layui.util
                //模拟数据1
                , data1 = eval(localStorage.getItem("treeData"));
                
                console.log(localStorage.getItem("treeData"));
            //常规用法
            tree.render({
                elem: '#test1' //默认是点击节点可进行收缩
                , data: data1
            });
        });
    </script>




</body>

</html>